import time
import unittest
from htmltestreport import HTMLTestReport

from app import BASC_URL, BASC_DIR
from script.TestWorkfiow import TestWorkflowapi
from script.test_approveapi import TestApprove
from script.test_kaihuapi import TestKaihuApi
from script.test_loginapi import TestRegLogin
from script.test_tenderapi import TestTenderApi

suite=unittest.TestSuite()

suite.addTest(unittest.makeSuite(TestRegLogin))
suite.addTest(unittest.makeSuite(TestApprove))
suite.addTest(unittest.makeSuite(TestKaihuApi))
suite.addTest(unittest.makeSuite(TestTenderApi))
suite.addTest(unittest.makeSuite(TestWorkflowapi))

# report_file=BASC_DIR+"/report/report{}.html".format(time.strftime("%Y%m%d_%H%M%S"))
report_file=BASC_DIR+"/report/report.html"
runner=HTMLTestReport(report_file,title='p2p金融项目接口自动化',description='v1.0')
runner.run(suite)
